package timing.ukulele.share;

import java.util.Arrays;

/**
 * 系统菜单级别
 * @author admin
 */
public enum MenuGradeEnum {

    OPERATOR(0, "运维"),
    PLATFORM(5, "平台"),
    ORG(10, "组织"),
    BUSINESS(15, "业务");


    private Integer value;

    private String description;

    MenuGradeEnum(Integer value, String description) {
        this.value = value;
        this.description = description;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public static Boolean hasValue(Integer value) {
        long count = Arrays.stream(values()).filter(item -> item.value.equals(value)).count();
        return count > 0;
    }
}
